package com.jiyun.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jiyun.dto.CaigouOrderDto;
import com.jiyun.entity.CaigouOrder;
import com.jiyun.mapper.CaigouOrderMapper;
import com.jiyun.service.ICaigouOrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 采购订单表 服务实现类
 * </p>
 *
 * @author 聪哥哥
 * @since 2023-02-22
 */
@Service
public class CaigouOrderServiceImpl extends ServiceImpl<CaigouOrderMapper, CaigouOrder> implements ICaigouOrderService {

    @Autowired
    CaigouOrderMapper caigouOrderMapper;
    @Override
    public Page<CaigouOrderDto> findPage(Integer page, Integer pageSize) {
        Page<CaigouOrderDto> caigouOrderPage = new Page<>(page, pageSize);
        caigouOrderMapper.findPage(caigouOrderPage);
        return caigouOrderPage;
    }

    @Override
    public String findMaxOrderId() {
        return caigouOrderMapper.findMaxOrderId();
    }
}
